# #coding:utf-8
#
# data={"username":"张三","age":21}
# print(data)
# print(len(data))
#
# for item in data:
#     print(item)
#
# # 获取key和value
# print(data.values())
# print(data.keys())
#
# #定义字典的时候，key不要重复
# data={"username":"张三","age":21,"age":23}
# print(data)


# 用dict创建字典
# data={}
# print(type(data))
#
#
# data=dict([("username","张三")])
# print(data)
#
#
# data=dict([("username","张三"),("age",21)])
# # print(data)
# print(type(data))


#dict的key必须是不可变类型：String,Number,Boolean
data={"username":"张三"}
data={"username":['张三','张三丰']}
print(data)

data={True:"张三"}
# print(data)
print(data[True])


# data={['username',"age"]:"张三丰"}
print(data)

data={1001:"张三"}
print(data)


